/** @file message.h
 * @brief iMsg definations
 * @author    - Robert Zhang <armner@gmail.com>
 *            - Wismy Yao <aheynie@gmail.com>
 * @date 2013-05
 * @version 1.0.0
 * @note
 */
#ifndef _MESSAGE_H_
#define _MESSAGE_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @def MSG_CREATE
 * @brief create a window
 */
#define MSG_CREATE      1 
/** @def MSG_PAINT
 * @brief paint a window
 */
#define MSG_PAINT       2 
/** @def MSG_INIT
 * @brief Initialization a window
 */
#define MSG_INIT        3 
/**< @def MSG_CLOSE
 * @brief close a window
 */
#define MSG_CLOSE     4
/**< @def MSG_KEY_DOWN
 *@brieg Key event\n down
 */ 
#define MSG_KEY_DOWN    5
/** @def MSG_KEY_UP
 * @brief Key event\n up
 */
#define MSG_KEY_UP    (6)
/** @def MSG_SET_FOCUS
 * @brief setFocus, wparam=0,1
 */
#define MSG_SET_FOCUS    (7)
#define MSG_TICK	(8)/**< @def MSG_TICK */
#define MSG_CUT_RECT (9)/**< @def MSG_CUT_RECT */
#define MSG_PASTE_RECT (10)/**< @def MSG_PASTE_RECT */
#define MSG_RESET_DC (11)/**< @def MSG_RESET_DC */
#define MSG_SETUP_DC (12)/**< @def MSG_SETUP_DC */


/** @def MSG_ADD_CHILD
 * @brief add a child to
 */
#define MSG_ADD_CHILD   (0x10+1)
#define MSG_DEL_CHILD   (0x10+2)/**< @def MSG_DEL_CHILD */
#define MSG_SET_OFFSET    (0x10+3)/**< @def MSG_SET_OFFSET */
#define MSG_SET_POSITION    (0x10+4)/**< @def MSG_SET_POSITION */

//#define MSG_SET_YOFFSET    (0x10+5)
//#define MSG_SET_ACTIVE    (0x10+6)
#define MSG_ACTIVE_ELDER_CHILD    (0x10+7)/**< @def MSG_ACTIVE_ELDER_CHILD */
#define MSG_ACTIVE_YOUNGER_CHILD    (0x10+8)/**< @def MSG_ACTIVE_YOUNGER_CHILD */
//#define	MSG_SET_ACTIVE_CHILD    (0x10+9)
//#define MSG_SET_PARENT      (0x10+11)
//#define MSG_ACTIVE_PREV_CHILD   (0x10 +12)
//#define MSG_ACTIVE_NEXT_CHILD   (0x10 +13)

#define MSG_SET_USER_PROC    (0x20+1)/**< @def MSG_SET_USER_PROC */
#define MSG_SET_GDI     (0x20 +2)/**< @def MSG_SET_GDI */



#define MSG_LEVEL_UP    (0x40 +1)/**< @def MSG_LEVEL_UP  */
#define MSG_LEVEL_DOWN  (0x40 +2)/**< @def MSG_LEVEL_DOWN */

#define MSG_SIGNAL  (0x80)/**< @def MSG_SIGNAL */

#define KEY_ENTER   (1)/**< @def KEY_ENTER */
#define KEY_NEXT  (2)/**< @def KEY_NEXT */
#define KEY_PREV  (3)/**< @def KEY_PREV */
//#define KEY_  (4)
#define KEY_UP      (5)/**< @def KEY_UP */
#define KEY_DOWN    (6)/**< @def KEY_DOWN */
#define KEY_ESC     (4)/**< @def KEY_ESC */
#define KEY_NOT_DEFINED (0xFF)/**< @def KEY_NOT_DEFINED */


#define MSG_USER  (0x10000 +1)/**< @def MSG_USER */
#define MSG_USER_CALIBRATE_DOWN        (MSG_USER +2)/**< @def MSG_USER_CALIBRATE_DOWN */


#ifdef __cplusplus
}
#endif

#endif

